<template>
  <div class="modal-overlay" @click.self="closeModal">
    <div class="modal-content">
      <h2>扫码付费</h2>
      <p>请扫描二维码进行支付</p>
      <img src="@/assets/images/测试二维码.png" alt="Payment QR Code">
      <button @click="closeModal">关闭</button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'PaymentModal',
  methods: {
    closeModal() {
      this.$emit('close');
    }
  }
};
</script>

<style scoped>
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-content img {
  max-width: 100%;
  height: auto;
  margin-top: 20px;
}

.modal-content button {
  background-color: #ff6347;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 4px;
  margin-top: 20px;
}

.modal-content button:hover {
  background-color: #ff4500;
}
</style>
